package com.cupcorn.balapkarung.state;

import org.andengine.entity.scene.ITouchArea;
import org.andengine.entity.scene.Scene;
import org.andengine.input.touch.TouchEvent;
import org.andengine.input.touch.detector.ClickDetector;
import org.andengine.input.touch.detector.ScrollDetector;

import android.view.KeyEvent;

import com.cupcorn.balapkarung.GameDefine;
import com.cupcorn.lib.Utils;
import com.cupcorn.lib.display.DisplaySprite;
import com.cupcorn.lib.game.GameEngine;
import com.cupcorn.lib.game.GameState;

public class StateGameOver extends GameState implements GameDefine
{
	DisplaySprite	displaySprite;
	
	public StateGameOver(GameEngine engine)
	{
		super(engine);
	}
	
	public void load()
	{
		displaySprite = new DisplaySprite(engine, GAME_OVER_SPR);
	}
	
	public void init()
	{
		Utils.TRACE("gameOver");
		
		for (int i = 0; i < GAME_PLAY_SPR.length; i++)
		{
			displaySprite.newSprite(i, engine.hud);
		}
		
	}
	
	public void update(float deltaTime)
	{	
		
	}
	
	public void exit()
	{	
		
	}
	
	public boolean keyUp(int keyCode, KeyEvent event)
	{
		if(keyCode == KeyEvent.KEYCODE_BACK)
		{
			engine.finish();
		}
		return false;
	}
	
	public void sceneTouch(Scene scene, TouchEvent touchEvent)
	{	
		
	}
	
	public boolean onAreaTouched(TouchEvent pSceneTouchEvent, ITouchArea pTouchArea, float pTouchAreaLocalX, float pTouchAreaLocalY)
	{
		
		return false;
	}
	
	public void click(ClickDetector clickDetector, int pointerID, float sceneX, float sceneY)
	{	
		
	}
	
	public void scrollStarted(ScrollDetector scrollDetector, int pointerID, float distanceX, float distanceY)
	{	
		
	}
	
	public void Scroll(ScrollDetector scrollDetector, int pointerID, float distanceX, float distanceY)
	{	
		
	}
	
	public void scrollFinished(ScrollDetector scrollDetector, int pointerID, float distanceX, float distanceY)
	{	
		
	}
	
}
